import useClipboard from 'vue-clipboard3'
import {ElNotification} from "element-plus";
const { toClipboard } = useClipboard()
export default function CopyHooks(){
    const handleCopy = async (content) => {
        try {
            await toClipboard(content)
            ElNotification({
                title: '成功',
                message: '复制成功',
                type: 'success',
            })
        } catch (e) {
            console.error(e);
            console.error('复制失败')
        }
    }
    return {
        handleCopy
    }
}
